

import 'package:flutter_bsbdj/bmob/bmob/table/bmob_object.dart';
import 'package:flutter_bsbdj/bmob/bmob/type/bmob_file.dart';
import 'package:json_annotation/json_annotation.dart';

part 'user_info.g.dart';

@JsonSerializable()
class UserInfoBean extends BmobObject {

  String pic;
  String userId;

  UserInfoBean();

  factory UserInfoBean.fromJson(Map<String, dynamic> json) => _$UserInfoFromJson(json);

  //此处与类名一致，由指令自动生成代码
  Map<String, dynamic> toJson() => _$UserInfoToJson(this);

  @override
  Map getParams() {
    Map<String, dynamic> map = toJson();
    Map<String, dynamic> data = new Map();
    //去除空值
    map.forEach((key, value) {
      if (value != null) {
        data[key] = value;
      }
    });
    return map;
  }

}